-- GENERATED SPELL FOR [Staff of Disintegration] --


function spell0_21274(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(36989,pUnit)
pUnit:RegisterEvent('Sorts_21274', 8288, 1)
end

function spell1_21274(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(36990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21274', 6000, 1)
end

function Sorts_21274(pUnit, Event)
local choix_sorts_21274 = math.random(0, 1)
if choix_sorts_21274 == 0 then
pUnit:RegisterEvent('spell0_21274', 1, 1)
end
if choix_sorts_21274 == 1 then
pUnit:RegisterEvent('spell1_21274', 1, 1)
end
end

function mob21274_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21274', math.random(1500, 3000), 1)
end

function mob21274_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21274_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21274_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21274, 1, 'mob21274_Action')
RegisterUnitEvent(21274, 2, 'mob21274_Leave')
RegisterUnitEvent(21274, 3, 'mob21274_Kill')
RegisterUnitEvent(21274, 4, 'mob21274_Die')
